package com.pandora.credit.service;

import com.pandora.credit.dto.request.CertificationRequest;
import com.pandora.credit.dto.request.CustomerLoansRequest;
import com.pandora.credit.dto.request.LoginRequest;
import com.pandora.credit.dto.request.ResetPasswordRequest;
import com.pandora.credit.dto.response.AuthorizationTokenResponse;
import com.pandora.credit.dto.response.LoanResponseNextStr;
import com.pandora.credit.entity.Customer;

import java.util.List;

/**
 * @author developer
 */
public interface CustomerService {

    /**
     * getByMobile
     * @param mobile mobile
     * @return Customer
     */
    Customer getByMobile(String mobile);

    /**
     * save
     * @param customer customer
     */
    void save(Customer customer);

    /**
     * update
     * @param customer customer
     */
    void update(Customer customer);

    /**
     * getByStatusArea
     * @param status status
     * @return CustomerList
     */
    List<Customer> getByStatusArea(String status);

    /**
     * resetPassword
     * @param req req
     * @param authorizationToken authorizationToken
     * @return AuthorizationTokenResponse
     */
    AuthorizationTokenResponse resetPassword(ResetPasswordRequest req, String authorizationToken);

    /**
     * requestCertification
     * @param certificationRequest certificationRequest
     * @param authorizationToken authorizationToken
     * @return AuthorizationTokenResponse
     */
    AuthorizationTokenResponse requestCertification(CertificationRequest certificationRequest, String authorizationToken);

    /**
     * login
     * @param request request
     * @param accessToken accessToken
     * @return AuthorizationTokenResponse
     */
    AuthorizationTokenResponse login(LoginRequest request, String accessToken);

    /**
     * doCustomerLoans
     * @param req req
     * @param authorizationToken authorizationToken
     * @return LoanResponseNextStr
     */
    LoanResponseNextStr doCustomerLoans(CustomerLoansRequest req, String authorizationToken);
}
